package com.xbongbong.saas.domain.dao;

import com.xbongbong.saas.domain.entity.TagLinkEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 *
 * @author 魏荣杰
 * @date 2019/2/27 13:56
 * @since v1.0
 * @version v1.0
 */
@Repository
@Mapper
public interface TagLinkDao {

    Integer insert(TagLinkEntity tagLink);

    Integer update(TagLinkEntity tagLink);

    List<TagLinkEntity> findEntitys(@Param("param") Map<String, Object> param);

    Integer getEntitysCount(@Param("param") Map<String, Object> param);

    void deleteTagTypeTags(@Param("tagType") Integer tagType, @Param("corpid") String corpid);

    void batchInsert(ArrayList<TagLinkEntity> tagLinkList);

    void deleteTagByTagTypeAndRefIdIn(@Param("corpid") String corpid, @Param("tagType") Integer tagType, @Param("refIdIn") List<Long> refIdIn);

    List<Long> getDataIdList(@Param("param") Map<String,Object> param);
}
